<template>
	<view class="content">
		<swiper class="swiper" 
		:autoplay="autoplay" 
		:duration="duration"
		:indicator-dots="false"
		>
			<swiper-item>
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="../../unpackage/manifest/start_480.png" mode="scaleToFill"></image></view>
				</view>
				<view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
			</swiper-item>
			<!-- <swiper-item>
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="../../static/title_02.jpg" mode="scaleToFill"></image></view>
				</view>
				<view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="../../static/title_02.jpg" mode="scaleToFill"></image></view>
				</view>
				<view class="experience" @tap="launchFlag()">{{experience}}</view>
			</swiper-item> -->
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				autoplay: false,
				duration: 500,
				jumpover: '跳过',
				experience: '立即体验'
			}
		},
		methods: {
			launchFlag: function(){
				/**
				 * 向本地存储中设置launchFlag的值，即启动标识；
				 */
				uni.setStorage({
						key: 'launchFlag',
						data: true,
				});
				uni.reLaunch({
					url: '/pages/index/index'
				});
			}
		}
	}
</script>
<style>
	page,
	.content{
		width: 100%;
		height: 100%;
		background-size: 100% 100% ;
		padding: 0;
	}
	.swiper{
		width: 100%;
		height: 100%;
		background: #FFFFFF;
	}
	.swiper-item {
		width: 100%;
		height: 100%;
		text-align: center;
		position: relative;
		display: flex;
		align-items:flex-end;
		flex-direction:column-reverse
	}
	.swiper-item-img{
		width: 100%;
		height: 100%;
		margin: 0 0;
	}
	.swiper-item-img image{
		width: 100%;
		height: 100%;
	}
	
	.jump-over{
		background: #fff;
		position: absolute;
		right: 30rpx;
		top: 88rpx;
		height: 70rpx;
		line-height: 70rpx;
		padding: 0 40rpx;
		border-radius: 40rpx;
		font-size: 32rpx;
		color: #666666;
		border: 1px solid #666666;
	}
	.experience{
		background: #fff;
		position: absolute;
		left:35%;
		right:0;
		bottom: 60rpx;
		height: 70rpx;
		text-align: center;
		width: 30%;
		margin: 0;
		line-height: 70rpx;
		border-radius: 40rpx;
		font-size: 32rpx;
		color: #666666;
		border: 1px solid #666666;
	}
</style>
